home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Power Programmierung
/
Power-Programmierung (Tewi)(1994).iso
/
magazine
/
msysjour
/
vol04
/
01b
/
macsl
/
mpmfig6.txt
< prev
next >
Wrap
Text File
|
1988-10-27
|
763b
|
36 lines
LOCAL BOOL MpmMenuLoad( hwndFrame, idResources )
HWND hwndFrame;
USHORT idResources;
{
MbarHandle hmbar;
MbarPtr pmbar;
SHORT sMenuCount;
MenuHandle hmenu;
hmbar = (MbarHandle)GetNewMBar( idResources );
if( ! hmbar )
return FALSE;
sMenuCount = MENUCOUNTOFHMBAR( hmbar );
ASSERT( sMenuCount > 0,
"MpmMenuLoad: null menu bar?" );
SetMenuBar( hmbar );
DisposHandle( (Handle)hmbar );
hmbar = (MbarHandle)MenuList;
hmenu = (**hmbar).mlist[0].hmenu;
ASSERT( hmenu,
"MpmMenuLoad: no apple menu?" );
_sAppleCount = CountMItems( hmenu );
AddResMenu( hmenu, 'DRVR' );
DrawMenuBar();
return TRUE;
}